<?php
require('../database/db.php');
try{
    $mysql = new mysql('xzsh');
    $phone = $_REQUEST[phone];
    
    //获取生活网该商家的子分类
	$sql = "SELECT * FROM `shop` where phone = $phone";
	$message = $mysql->getRow($sql);
	$sql2 = "SELECT * FROM `zifenlei` where id in (".$message[zileimu].")";
	$categroy = $mysql->getAll($sql2);
	
	$arr = array('code' => 100, 'tip' =>'查询成功' ,'ziname' =>$categroy);
    echo json_encode($arr);
    }
	//捕获异常
	catch(Exception $e)
	 {
	   $arr = array('code' => 101, 'tip' =>'查询失败');
	   echo json_encode($arr);
	 }

?>